import request from '@/utils/request'

// 查询代理钱包列表
export function listAgentWallet(query) {
    return request({
        url: '/customer/v1/agent/wallet/page',
        method: 'post',
        data: query
    })
}

// 查询代理钱包详细
export function getAgentWallet(id) {
    return request({
        url: '/customer/v1/agent/wallet?id=' + id,
        method: 'get'
    })
}

// 新增代理钱包
export function addAgentWallet(data) {
    return request({
        url: '/customer/v1/agent/wallet',
        method: 'post',
        data: data
    })
}

// 修改代理钱包
export function updateAgentWallet(data) {
    return request({
        url: '/customer/v1/agent/wallet',
        method: 'put',
        data: data
    })
}

// 刷新代理钱包余额
export function refreshBalance(id) {
    return request({
        url: '/customer/v1/agent/wallet/refresh_balance?id=' + id,
        method: 'post'
    })
}

// 选择租户支付钱包转账代理钱包
export function transfer(data) {
    return request({
        url: '/customer/v1/agent/wallet/transfer',
        method: 'post',
        data: data
    })
}
